<%@ page import="org.icress.fusion.admin.Group" %>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="layout" content="main" />
    <g:set var="entityName" value="${message(code: 'admin.group.label', default: 'Group')}" />
    <title><g:message code="default.show.label" args="[entityName]" /></title>
</head>
<body>
	<div class="nav">
        <shiro:hasPermission permission="group:list">
        <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
        </shiro:hasPermission>
        <shiro:hasPermission permission="group:create">
        <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
        </shiro:hasPermission>
	</div>
	<div class="body">
		<h1><g:message code="group.show" default="Show Group" /></h1>
		<g:if test="${flash.message}">
			<div class="message"><g:message code="${flash.message}" args="${flash.args}" default="${flash.defaultMessage}" /></div>
		</g:if>
		<g:form>
			<g:hiddenField name="id" value="${groupInstance?.id}" />
			<div class="dialog">
				<g:render template="/admin/group/show" />
			</div>
			<div class="buttons">
				<span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'edit', 'default': 'Edit')}" /></span>
				<span class="button">
					<g:actionSubmit 
						class="delete" 
						action="delete" 
						value="${message(code: 'delete', 'default': 'Delete')}" onclick="return confirm('${message(code: 'delete.confirm', 'default': 'Are you sure?')}');" />
				</span>
			</div>
		</g:form>
        <!-- User List -->
        <h1>User List</h1>
        <div class="list">
        	<g:render template="/shiro/user/list" model="[userInstanceList:groupInstance.users]" />
        </div>        
		
		
	</div>
</body>
</html>
